window.onload=()=>{
    score();

 document.querySelector('.btn').addEventListener('click',function(){
     let stu = window.location.search.slice(window.location.search.indexOf("?")+1,window.location.search.indexOf('&'))
     let stu_id = window.location.search.slice(window.location.search.indexOf('&')+1)
     window.location.href = `JxtestPaper.html?${stu}&${stu_id}`
 })
}
let score=async()=>{
    let result =await ajax({
        type:"get",
        url:"http://127.0.0.1:4000/tested/GetTested",
    })
    let {code,obj}=JSON.parse(result);
    if(code==200){
        for(let item of obj){
            console.log(item.score);
            document.querySelector(".score").innerHTML=item.score+"分"
        }
    }
}